package com.platform.entity;

import com.platform.utils.StringUtils;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 会员实体
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2017-08-16 15:02:28
 */
@Data
public class WithdrawEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    public static final String TRANSFER_TYPE_BANKCARD   =   "1";
    public static final String TRANSFER_TYPE_WX         =   "2";

    public static final Integer STATUS_INIT     =   1;
    public static final Integer STATUS_DEAL     =   2;

    //主键
    private Long id;
    private String withdrawSn;
    private Long applyUserId;
    private String applyUserName;
    private Date applyDate;
    private BigDecimal applyMoney;
    private BigDecimal withdrawCharge;
    private BigDecimal withdrawRealityMoney;
    private Integer status;
    private Long payUserId;
    private String payUsreName;
    private String transferType ;          //提现方式      1 银行卡  2微信余额


    public String getStatusDesc(){
        if (status != null){
            if (status == 1){
                return "待打款";
            } else if (status == 2){
                return "已打款";
            } else {
                return "";
            }
        } else {
            return "";
        }
    }

    public String getTransferTypeDesc(){
        if (StringUtils.isNullOrEmpty(transferType)){
            return "";
        } else if (transferType.equals(TRANSFER_TYPE_BANKCARD)){
            return "银行卡";
        } else if (transferType.equals(TRANSFER_TYPE_WX)){
            return "微信";
        } else {
            return "";
        }
    }
}
